package com.goods.business.controller;

import com.goods.business.pojo.Student;
import com.goods.business.service.StudentService;
import com.goods.common.vo.business.ProductCategoryTreeNodeVO;
import com.goods.common.vo.business.ProductCategoryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class StudentControllertt {
    @Autowired
    StudentService studentService;


    public List<ProductCategoryTreeNodeVO> selepage(Integer pageNum, Integer pageSize){
        List<ProductCategoryTreeNodeVO> selepage = studentService.selepage(pageNum, pageSize);
        return selepage;
    }

    public List<ProductCategoryTreeNodeVO> getParentCategoryTree() {
        return studentService.toClass();
    }

    public void add(Map map) {
        studentService.add(map);
    }

    public Integer delById(Integer id) {
        return studentService.delById(id);
    }

    public void updatebyId(Long id, ProductCategoryVO map) {
        studentService.updatebyId(id,map);
    }

    public Student selectById(Long id) {
        return studentService.selectById(id);
    }
}
